using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace HamcoWcs.Entitys.Logs
{
    public class DeviceMsgLogConfig : IEntityTypeConfiguration<DeviceMsgLog>
    {
        public void Configure(EntityTypeBuilder<DeviceMsgLog> builder)
        {
            builder.HasComment("设备通讯日志");
            builder.Property(x => x.PlcName).IsRequired().HasMaxLength(30).HasComment("PLC名");
            builder.Property(x => x.DeviceName).HasMaxLength(30).HasComment("设备名");
            builder.Property(x => x.TaskId).HasMaxLength(30).HasComment("任务号");
            builder.Property(x => x.UnitId).HasMaxLength(30).HasComment("托盘号");
            builder.Property(x => x.Direction).HasMaxLength(30).HasComment("方向：rend/recv");
            builder.Property(x => x.MsgValue).IsRequired().HasMaxLength(500).HasComment("创建时间");
        }
    }
}